package com.example.Test;


import com.example.mapper.UserMapper;
import com.example.mapper.impl.UserMapperImpl;
import com.example.dao.User;
import org.junit.Test;


public class Test1 {

    @Test
    public void testSelectById(){
        //System.out.println("test...");
        UserMapper mapper = new UserMapperImpl();
        User user = mapper.selectId(1);
        System.out.println("student = " + user);
    }
    @Test
    public void testInsertId(){
        User user = new User();
        user.setUsername("xiaohong");
        user.setPassword("123");
        UserMapper userMapper = new UserMapperImpl();
        Integer integer = userMapper.insertId(user);
        System.out.println(integer);
    }
    @Test
    public void testUpdate(){
        User user = new User();
        user.setId(7);
        user.setUsername("xiaohong");
        user.setPassword("123");
        UserMapper userMapper = new UserMapperImpl();
        Integer integer = userMapper.updateUser(user);
        System.out.println(integer);
    }
    @Test
    public void testDelete(){
        UserMapper userMapper = new UserMapperImpl();
        Integer integer = userMapper.deleteUserId(7);
        System.out.println(integer);
    }
    @Test
    public void testSelectAll(){
        //System.out.println("test...");
    }
}
